<template>
  <el-card class="box-card" shadow="hover">
    <div class="product-item">
<!--      图片-->
      <el-row :gutter="10" type="flex" justify="center">
       <el-col :span="24">
         <el-image :src="src" class="item-image"></el-image>
       </el-col>
      </el-row>
<!--      标题-->
      <el-row :gutter="10" type="flex" justify="center">
       <el-col :span="24">
         <span class="item-title">
           {{title}}
         </span>
       </el-col>
      </el-row>
<!--      价格-->
      <el-row :gutter="10" type="flex" justify="center">
        <el-col :span="9" class="item-money">
         <span>
           ￥{{price}}
         </span>
        </el-col>
      </el-row>
      <el-row :gutter="0" type="flex" justify="center" style="padding-top: 20px">
       <el-col :span="11">
         <el-button type="primary">立即购买</el-button>
       </el-col>
      </el-row>
    </div>
  </el-card>
</template>

<script>
export default {
  name: 'ProductItem',
  props: {
    title: {
      type: String,
      default: ''
    },
    price: {
      type: Number,
      default: 0
    },
    src: {
      type: String,
      default: ''
    }
  }
}
</script>

<style scoped lang="scss">
  .box-card {
    margin-bottom: 20px;
  }
    .product-item {
      width: 100%;
      height: 364px;

      background: #ffffff;
      .item-image {
        padding-top: 20px;
        height: 200px;
        width: 100%;
      }
      .item-title {
        width: 100%;
        text-align: center;
        padding-top: 20px;
        font-size: 14px;
      }
      .item-money {
        margin-top: 20px;
        font-size: 20px;
        color: #e01d20;
      }
    }
</style>
